﻿#ifndef C3FDREPORTDATA_H
#define C3FDREPORTDATA_H

#include <QList>
#include <QMap>
#include <QString>
#include "CommonAPI.h"

namespace Common
{

	struct BladeRowData
	{
		QString name;
		int numOfBlade;
		double gap;
		int numOfMesh;
	};

	struct BoundaryData
	{
		double inletPressure;
		double inletTemperature;
		double outletPressure;
		double rotationSpeed;
	};
	struct PerformanceData
	{
		double inletFlow;
		double pressureRatio;
		double efficiency;
	};

	struct PerformanceDataList
	{
		QString name;
		double rotationSpeed;
		QList<PerformanceData> datas;
	};

	struct PerformanceImage
	{
		QString name;
		QString img;
	};

	struct FlowImage
	{
		QString name;
		QString img;
	};

	class COMMONAPI C3fdReportData
	{
	public:
		C3fdReportData() = default;
		virtual ~C3fdReportData() = default;

		QList<BladeRowData> getMeshModel();
		void setMeshModel(QList<BladeRowData> data);
		void addBladeRowData(BladeRowData data);
		void addBladeRowData(QString name, int bladeNum, double gap, int meshNum);
		bool updateBladeRowMeshNum(QList<int> nums);
		BoundaryData getBoundaryModel();
		void setBoundaryModel(BoundaryData data);
		void setBoundaryModel(double inletPress, double inletTemp, double outletPress, double rotateSpeed);
		QList<PerformanceDataList> getPerformanceDatas();
		void setPerformanceDatas(QList<PerformanceDataList> data);
		void addPerformanceData(PerformanceDataList data);
		void addPerformanceData(QString name, double speed, QList<PerformanceData> datas);
		QList<PerformanceImage> getPerformanceImages();
		void setPerformanceImages(QList<PerformanceImage> data);
		void addPerformanceImage(PerformanceImage data);
		void addPerformanceImage(QString name, QString img);
		QList<FlowImage> getFlowImages();
		void setFlowImages(QList<FlowImage> data);
		void addFlowImage(FlowImage data);
		void addFlowImage(QString name, QString img);

	private:
		QList<BladeRowData> m_MeshModel = {};
		BoundaryData m_BoundaryModel = {};
		QList<PerformanceDataList> m_PerformanceDatas = {};
		QList<PerformanceImage> m_PerformanceImages = {};
		QList<FlowImage> m_FlowImages = {};
	};

}
#endif